<template>
    <div class="my-textarea">
      <el-input type="textarea" v-model="value" :rows="8" :placeholder="placeholder"></el-input>
      <!-- <textarea ref="textarea" :style="{'height': height}" :maxlength="maxLength" v-model="value" :placeholder="placeholder" class="textarea" ></textarea> -->
    </div>
  </template>
  
  <script>
    export default {
      name: 'aw-textarea',
      props: {
        // 用来辨别是哪个数据调用的
        textareaName: {
          required: true
        },
        // placeholder显示的内容
        placeholder: {
          default: '请填写'
        }
      },
      data() {
        return {
          // textarea内容
          value: '',
        }
      },
      watch: {
        value() {
          this.$emit('changeTextarea', this.value, this.textareaName);
        }
      },
      mounted() {
      },
      methods: {
      }
    }
  </script>